package Package_7;

import java.util.StringJoiner;

public class test_1 {
    public static void main(String[] args) {
        //1.创建对象
        StringJoiner sj=new StringJoiner(", ","[","]");

        //2.添加元素
        sj.add("aaa").add("bbb").add("ccc");

        int length = sj.length();
        System.out.println(length);

        //3.打印
        System.out.println(sj);
        String s = sj.toString();
        System.out.println(s);

    }
}